# 软件包 libevent-2.1.8-5.el8.x86_64 已安装。
#[root@localhost ~]# rpm -qa | grep libevent
#libevent-2.1.8-5.el8.x86_64
#libverto-libevent-0.3.0-5.el8.x86_64
#libevent-devel-2.1.8-5.el8.x86_64

# 注意: libevent库在 /usr/include/event2目录下。
include_directories(/usr/include/event2)
link_directories(/usr/lib64)


add_executable(Libevent01 Libevent01.cpp)
target_link_libraries(Libevent01 libevent.so)

#/usr/bin/cmake --build /home/liuyou/CLionProjects/HighPerformanceLinuxServerProgramming-Linux2/cmake-build-debug --target Libevent01 -- -j 6
#[ 50%] Linking CXX executable Libevent01
#/usr/bin/ld: 找不到 -llibevent
#collect2: 错误：ld 返回 1
#gmake[3]: *** [src/Libevent/CMakeFiles/Libevent01.dir/build.make:103：src/Libevent/Libevent01] 错误 1
#gmake[2]: *** [CMakeFiles/Makefile2:546：src/Libevent/CMakeFiles/Libevent01.dir/all] 错误 2
#gmake[1]: *** [CMakeFiles/Makefile2:553：src/Libevent/CMakeFiles/Libevent01.dir/rule] 错误 2
#gmake: *** [Makefile:280：Libevent01] 错误 2
# 注意: todo 笔记: 这种错误是要写动态链接库全名, 即 *.so, 不要省略 .so！！！！